package com.leo.collisions;

import com.almasb.fxgl.entity.Entity;
import com.almasb.fxgl.physics.CollisionHandler;
import com.leo.common.GameType;

/**
 * 子弹和边界的碰撞检测
 */
public class BulletBorderHandler extends CollisionHandler {

    public BulletBorderHandler() {
        super(GameType.BULLET, GameType.BORDER);
    }

    @Override
    protected void onCollisionBegin(Entity a, Entity b) {
        a.removeFromWorld();
    }
}
